Package edu.claflin.finder
Class Main
- java.lang.Object
-
- edu.claflin.finder.Main
-
public class Main extends java.lang.ObjectInterprets the command line arguments provided to the program.- Version:
- 3.2 February 4, 2016
- Author:
- Charles Allen Schultz II
-
-
Constructor Summary
Constructors Constructor Description Main()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static voiderror()Used to process a fatal error.static voidmain(java.lang.String[] args)Command line argument processing occurs here.private static AlgorithmparseAlgorithm(java.lang.String algorithmCode, java.util.HashMap<java.lang.String,java.lang.Boolean> config, java.util.ArrayList<Condition> conditions, java.util.Comparator<Edge> comparator)Parses an algorithm code string for returning the appropriate Algorithm object.private static boolean[]parseBoolean(java.lang.String booleans)Parses a boolean string for configuring the {}.private static voidwriteGraphs(java.util.ArrayList<Graph> graphs, java.lang.String output, GraphWriter writer)Writes Graph objects to memory.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
Command line argument processing occurs here. Program usage:java -jar SubgraphFinder.jar -v -out <booleans> -log <booleans> [ -f <FILE> | -m <MANIFEST> ] -input <TYPE> <OPTION> -output <TYPE> <OPTION> -algo <ALGO>-f <FILE> : Supply a single file to be parsed.-m <MANIFEST> : Supply a manifest listing several files to be parsed.-level <OPTION><OPTION> : A logging level.NORMAL : Shallowest logging level. Least amount of messages.VERBOSE : Moderate logging; includes intermittent operations.DEBUG : Highest logging granularity; logs every message.-out <booleans> :: -log <booleans>out : Logging to command prompt options.log : Logging to file options.<booleans> : Use 't' for true and 'f' for false. The supplied arguments shouldbe concatenated as a single string. There are currently four (4) needed:ALGO : Logging of Algorithm operations.ERRR : Logging of Error informations.GRPH : Logging of Graph operations.INFO : Logging of General informations.-input <TYPE> :: -output <TYPE>input : How to process the source graphs.output : How to output the found graphs.<TYPE> : Select from one of the following options:SIMPLE : Simple tab delimited format. (DEFUALT)SIF : Simple Interaction Format as defined in the Cytoscape Manual.NOA : NOA Batch Format as defined in the NOA Plugin for Cytoscape. (OUTPUT ONLY)<OPTION> : Some formats require an additional parameter described below:SIF : Default Relationship Type (i.e. \"pp\" or \"pd\")NOA : Same as SIF.-cfg <OPTION> : Some algorithms receive special configuration parameters, all of which default to false.<OPTIONS> : Select from one of the following options:PRESERVATIVE : Preserves edges on expansion.-type <OPTION> : A subgraph type to look for.<OPTIONS> : Select from one of the following options:BIPARTITE : Bipartite Subgraphs.CLIQUE : Clique Subgraphs.DCLIQUE : Directed Clique Subgraphs.-order <OPTION> : An ordering to impose<OPTIONS> : Select from one of the following options:EDGEWEIGHT : Order expansion based on the data attached to the edge interpretted as a number.(Higher values are taken first.)-undirected : Interprets a graph as being undirected.-algo <ALGO> : The algorithm code indicating the method of finding BSGs to use.<ALGO> : Select from one of the following options:BFTS : Finds bipartite graphs based on a breadth first traversal search of the network.DFTS : Finds bipartite graphs based on a depth first traversal search of the network.BNDL : See below for instruction. (Do not self-reference. Program will exit with error.)-algo BNDL <ALGO>( <ALGO> ...) : Load a BUNDLE Algorithm. Processes the graph using eachof the provided Algorithms. Algorithm codes should be the same as above and delimitedusing spaces. NOTE: this must be the last argument as the program assumes all followingarguments are Algorithm codes.- Parameters:
args- the String array containing the program's startup parameters.
-
writeGraphs
private static void writeGraphs(java.util.ArrayList<Graph> graphs, java.lang.String output, GraphWriter writer)
Writes Graph objects to memory. Does so in a manner so as to promote extensibility.- Parameters:
graphs- the ArrayList object containing the graphs to write.output- the String representing the folder in the memory to store the graphs in.writer- theGraphWriterobject to use for writing the graphs.
-
parseBoolean
private static boolean[] parseBoolean(java.lang.String booleans)
Parses a boolean string for configuring the {}. Converts the characters in the string into a boolean array depending on if they are 't' for true or 'f' for false.- Parameters:
booleans- the String containing the boolean pattern.- Returns:
- the boolean array initialized from the String.
-
parseAlgorithm
private static Algorithm parseAlgorithm(java.lang.String algorithmCode, java.util.HashMap<java.lang.String,java.lang.Boolean> config, java.util.ArrayList<Condition> conditions, java.util.Comparator<Edge> comparator)
Parses an algorithm code string for returning the appropriate Algorithm object.- Parameters:
algorithmCode- the String containing the correct Algorithm code.- Returns:
- the
Algorithmobject instantiated from the code.
-
error
private static void error()
Used to process a fatal error. Kills the program with a warning to the user.
-
-